package com.peanut.pojo;

/**
 * @author chenhs
 * @date 2021/4/13
 */
public class Userproxy  implements IUser{
	
	 public  Userproxy(UserImpl user){
	 	this.user =user;
	 }
	private UserImpl user;
	
	public void add() {
		this.log("add");
		user.add();
	}
	
	public void update() {
		this.log("update");
		user.update();
	}
	
	public void query() {
		this.log("query");
		user.query();
	}
	
	public void delete() {
		this.log("delete");
		user.delete();
	}
	
	
	private  void  log(String str){
		System.out.println("使用了"+str+"方法");
		
	}
}
